package com.test.task.service;

import com.test.task.beans.Plan;
import com.test.task.beans.Task;
import com.test.task.dao.StaffDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class StaffServiceImpl implements StaffService {
    @Autowired
    StaffDao staffDao;
    @Override
    public List<Plan> listPlan(Plan plan) {
        return staffDao.listPlan(plan);
    }

    public List<Task> listTask() {
        return staffDao.listTask();
    }

    @Override
    public List<Task>  queryTask(String username) {
        return staffDao.queryTask(username);
    }

    public void addPlan(Plan plan) {
        staffDao.addPlan(plan);
    }

    @Override
    public Task findTask(int task_id) {
        return staffDao.findTask(task_id);
    }

    @Override
    public void deletePlan(Integer id) {
        staffDao.deletePlan(id);
    }

    @Override
    public void feedback(Plan plan) {
        staffDao.feedback(plan);
    }

    @Override
    public Plan findPlan(int id) {
        return staffDao.findPlan(id);
    }
}
